<?php
namespace app\index\controller\project;

use app\index\controller\Base;

class base_project extends Base
{
    public  $base_project_id=0;
    public function _initialize()
    {
        parent::_initialize();
       $base_p_id= input("project_id");
       if(!empty($base_p_id)){
            cookie("base_project_id",$base_p_id);
       }       
      $this->base_project_id=cookie("base_project_id");
       if($this->allow_project_ids!=999){
           if(!in_array($this->base_project_id,$this->allow_project_ids)){
            $this->error("该项目无权访问",url("/index/home/index"));
           }
       }
       if(empty($this->base_project_id)){
        $this->redirect(url("/Index/home/index"));        

       }
      $this->assign(["base_project_id"=>$this->base_project_id]);

    }
}